package cn.duli.xianer.service.impl;

import cn.duli.xianer.dao.UserAuthMapper;
import cn.duli.xianer.pojo.UserAuth;
import cn.duli.xianer.service.UserAuthService;
import com.github.pagehelper.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserAuthServiceImpl implements UserAuthService {

    @Resource
    private UserAuthMapper userAuthMapper;

    @Override
    public int save(UserAuth userAuth) {
        userAuthMapper.save(userAuth);
        return userAuth.getUaId();
    }

    @Override
    public UserAuth findByUserId(Integer uaUid) {
        return userAuthMapper.findByUserId(uaUid);
    }


    @Override
    public Page<UserAuth> findAll() {
        return userAuthMapper.findAll();
    }

    @Override
    public UserAuth findById(Integer uaId) {
        return userAuthMapper.findById(uaId);
    }

    @Override
    public void updateAlipay(UserAuth userAuth) {
        userAuthMapper.updateAlipay(userAuth);
    }

}
